#include<stdio.h>
int  getDays(int year,int month) ;

int main()
{
    int    year, month ;

    scanf("%d%d",&year,&month);
    printf("There are %d days in month %d year %d.",getDays(year,month), month, year) ;

    return 0 ;    
}

int getDays(int year,int month)
{
   int day;
   if(month==1||month==3||month==5||month==7||month==8||month==10||month==12) 
   day=31;
   if(month==4||month==6||month==9||month==11)
   day=30;
   if(month==2)
   {
       day=28;
       if(year%4==0&&year%100!=0) day=29;
       if(year%400==0) day=29;
   }
       return day;
}

